Skip to content

feat: add BaseSession solver properties#4994

Draft
mayankansys wants to merge 5 commits intomainfrom
feat/base_session_4797
Draft

feat: add BaseSession solver properties#4994
mayankansys wants to merge 5 commits intomainfrom
feat/base_session_4797

Conversation

@mayankansys
Copy link
Collaborator

@mayankansys mayankansys commented Mar 16, 2026

Context

Before this change, validation for launch settings (especially in tests) relied more on launch construction/dry-run behavior than on querying the live Fluent session state directly.

Change Summary

  • Added runtime properties on BaseSession:
    • precision
    • dimension
    • processor_count
  • Implemented these using live Fluent queries so values come from the active session.
  • Updated launcher test coverage to assert these properties directly from a running session.

Impact

  • Affects session metadata access and launch validation tests.
  • Improves developer/test workflows by providing direct, readable runtime checks.
  • No breaking API changes; this is additive (new BaseSession properties).

@mayankansys mayankansys linked an issue Mar 16, 2026 that may be closed by this pull request
@mayankansys mayankansys changed the title feat: added the changes feat: add BaseSession runtime properties for precision, dimension, and processor count Mar 17, 2026
@mayankansys mayankansys changed the title feat: add BaseSession runtime properties for precision, dimension, and processor count feat: add BaseSession changes Mar 17, 2026
Comment on lines +315 to +335
@property
def precision(self) -> int:
"""Return the current solver precision.

Returns
-------
int
``1`` for single precision, ``2`` for double precision.
"""
return 2 if self.scheme.eval("(rp-double?)") else 1

@property
def dimension(self) -> int:
"""Return the current dimensionality.

Returns
-------
int
``2`` for 2D, ``3`` for 3D.
"""
return 3 if self.scheme.eval("(rp-3d?)") else 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should return the enums no?

@Gobot1234 Gobot1234 changed the title feat: add BaseSession changes feat: add BaseSession solver properties Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add BaseSession.precision, dimension, processor_count etc.

3 participants